package Service.impl;

import Service.ICountryService;
import dao.ICountryDao;
import dao.impl.CountryDaoImpl;
import pojo.Country;

import java.util.List;

public class CountryServiceImpl implements ICountryService {
    private ICountryDao countryDao=new CountryDaoImpl();
    @Override
    public void addCountry(Country country) {
        countryDao.addCountry(country);
    }

    @Override
    public void updateCountry(Country country) {
        countryDao.updateCountry(country);
    }

    @Override
    public void deleteCountry(int id) {
        countryDao.deleteCountry(id);
    }

    @Override
    public List<Country> findAll() {
        return countryDao.findAll();
    }

    @Override
    public Country findById(int id) {
        return countryDao.findById(id);
    }

    @Override
    public Country findByCountryName(String name) {
        return countryDao.findByCountryName(name);
    }
}
